module beep (
    input sys_clk,
    input sys_rst_n,
    input key,
    output reg beep
);

wire key_filter;

key_debounce u_key_debounce(
    .sys_clk(sys_clk),
    .sys_rst_n(sys_rst_n),
    .key(key),
    .key_filter(key_filter)
);

always @(negedge key_filter or negedge sys_rst_n) begin
    if(!sys_rst_n)
        beep <= 1'b0;
    else
        beep <= ~beep;
end
    
endmodule